import os
Import ("*")

lib_name = "sql_well"
tar_name = "sql_well"

env = custom_env.Clone ()
env.AppendUnique (CPPPATH = ["include", "src",
    includes["bs_bos_core_base"],
    includes["common_types"],
    includes["common_alg"],
    includes["bs_bos_core_data_storage"],
	includes["bs_mesh"],
	includes["bs_mesh_src"],
	includes["bs_mtx"]
    ] + includes["kernel"],
	CPPDEFINES = ["_HDF5", 'H5_USE_16_API'],
    LIBS=["sqlite3", "CGAL", "gmp", "boost_filesystem"],
	CXXFLAGS = ["-frounding-math"])

libs = ["blue_sky", "bs_bos_core_base"]
boost_libs = list_suffix(["boost_serialization"], env["boost_suffix"]);

if (build_kind == "debug") :
    env.AppendUnique (LIBS = [list_suffix(libs, "_d"), list_suffix(boost_libs, "-d")])
    lib_name += "_d"
elif (build_kind == "release") :
    env.AppendUnique (LIBS = [libs, boost_libs])

sql_well = env.SharedLibrary (target = os.path.join (tar_exe_plugin_dir, lib_name), source = files (["."]).sources)

env.Alias (tar_name, sql_well)
Export ("sql_well")

if (env["install"] == 1) :
    inst_tar = env.Install ("$plugins_prefix", sql_well)
    env.Alias (tar_name, inst_tar)
